<!--
	作者：956911785@qq.com
	时间：2019年10月24日01:28:08
	描述：学生个人中心-诗词
-->

<template>
	<Modal :title="title" v-model="modal0" closable fullscreen>
		<div style="width:100%;">
			<template v-for="item,index in paramlist">
				<div style="width:100%;float:left;padding-bottom:20px;text-align: center;">
					<div style="width:100%;float:left;">
						<label style="font-size: 20px;font-weight: bold;">{{item.PNAME}}</label>
					</div>
					<div style="width:100%;float:left;">
						<label style="font-size: 14px;">{{item.AUTHOR}}</label>
					</div>
					<div style="width:100%;float:left;">
						所得分数：{{item.score}}分({{item.jb}})
					</div>
					<div style="width:100%;float:left;">
					 	背诵时间：{{item.PUBILSHTIME}}
					</div>
					<div style="width:100%;float:left;display: flex;align-items: center;justify-content: center;margin-top:10px;">
						<div style="font-size: 16px;width:60%;">
							<p v-html="item.PCONTENT"></p>
						</div>
						<template v-for="item1,index1 in listpic">
							<div style="width:60%;">
								<img :src="localurl+item1.PICURL">
							</div>
						</template>	
					</div>
				</div>
			</template>
		</div>
		<div slot="footer">
			<Button type="text"  @click="closeModal()">取消</Button>
			<Button type="primary" @click="download()" >下载</Button>
		</div>
    </Modal>
</template>

<script>
	const _config = require('./../../../../../config/config')
	export default {
		name:"tconent",
		props: {
    		usid:{
    			type:String,	
    			default: function() {
					return ""
				}
    		},
    		title:{
    			type:String,	
    		},
    	},
		data() {
			return {	  
                modal0:false,
                visible: false,
				paramlist:[],
				localurl:_config._ADMIN_SERVER+"/"
			}
		},
		methods: {
			
            closeModal(){
	      	    this.modal0 = false;
	        },
			
			getStudentPoetryDataInfo(){
				var usid=this.usid;
				this.$http.get("/host/readbook/staticlog/getStudentPoetryDataInfo.html?usid="+usid)
				.then(datas => {
					const paramlist=datas;
					this.paramlist=paramlist;
				});
			},
			 
			download(){
				var usid=this.usid;
				window.open(_config._ADMIN_SERVER+"/readbook/staticlog/exportStudentPoetryDataInfo.html?usid="+usid);
			},

		},
		mounted() {
		},
		watch:{
			modal0(news,olds){
				if(news){
					this.getStudentPoetryDataInfo();
				}
			}
		},
		computed: {
		
		}
		
	}
</script>

<style scoped="scoped">
	
</style>



